package Java9_2.Test_5;

import Java9_2.Test_3.Teacher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Scanner;

public class Teacher_test {
    public static final Logger Log= LoggerFactory.getLogger("Java9_2.Test_5.Teacher_test");
    public static void main(String[] args) {
        Log.warn("小心，我在演示异常处理");
        Log.debug("请输入姓名，年龄，学校");
        Log.info("构建了一个输入器！");
        Scanner in=new Scanner(System.in);
        try {
            Java9_2.Test_3.Teacher t=new Teacher(in.next(),in.nextInt(),in.next());
            t.setAge(in.nextInt());
        } catch (Exception e) {
            Log.error("输入了错误的数字！" + e.getMessage());
            Log.error("出现了错误",e);
        }
    }
}
